<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
		<title>确认支付</title>
		<link rel="stylesheet" type="text/css" href="css/public.css"/>
	</head>
	<style type="text/css">
		.head{height: 3.1rem;background: #0d6fb8;color: #fff;text-align: center;padding-top: 1.9rem;}
		.head p{font-size: 0.36rem;}
		.head .money{font-size: 0.6rem;margin-top: 0.35rem;}
		.inputBox{height: 1.05rem;background: #fff;margin-bottom: 0.5rem;}
		.inputBox img{height: 0.5rem;width: auto;margin-left: 0.2rem;}
		.inputBox input{height: 0.6rem;margin-left: 0.2rem;font-size: 0.32rem;caret-color:#009788;}
		.querPay{height: 0.9rem;width: 7.1rem;background: #0d6fb8;margin: 0 auto;font-size: 0.3rem;color: #fff;border-radius: 5px;}
	</style>
	<body onload="document.getElementById('inputTxt').focus()">
		<div class="head">
			<p>支付金额</p>
			<p class="money"></p>
		</div>
		<div class="inputBox flex flex-align-center">
			<img src=""/>
			<input type="number" id="inputTxt" placeholder="请输入验证码"/>
		</div>
		<!--确认支付-->
		<div class="querPay flex flex-align-center flex-pack-center"><p>确认支付</p></div>
	</body>
	<script type="text/javascript" src="js/rem.js"></script>
	<script type="text/javascript" src="js/zepto.js"></script>
	<script type="text/javascript" src="js/template.js"></script>
	<script type="text/javascript" src="js/layer.js"></script>
	<script type="text/javascript" src="js/api.js"></script>
	<script type="text/javascript" src="js/common.js"></script>
	<script type="text/javascript">
		$(function(){
			var orderNo = Util.GetQueryString('orderNo');
			var cardNo = Util.GetQueryString('cardNo');
			var tradeAmt = Util.GetQueryString('tradeAmt');
			var orderId = Util.GetQueryString('orderId');
			$('.money').html(tradeAmt);
			$('.querPay').click(function(){
				var verifyCode = $('#inputTxt').val();
				if(verifyCode != ''){
					Public.sdkPay({
						method: 'channel.order.pay',
						version: '1.0.2',
						orderNo: orderNo,
						cardNo: cardNo,
						verifyCode: verifyCode, //验证码
						userId: localStorage.userId
					},function(res){
						Util.jump('./orderDetails.html?orderId='+orderId);
					})
				}else{
					layer.open({content:'请输入验证码',skin: 'msg',time: 2 });
				}
			});
		})
	</script>
</html>
